import Base from "../Base.js";
import adminMoviesApi from "../../api/AdminMovies.js";


export default class extends Base {
    handle() { };
    //渲染电影信息列表


    renrender() {
        layui.use("table", function () {
            layui.table.render({
                elem: "#test",
                url: "",
                page: true,
                limit: 10,
                cols: [[
                    , { field: 'id', minWidth: 50, title: '序号', sort: true, align: 'center' }
                    , { field: 'cname', width: 100, title: '电影名', sort: true, align: 'center' }
                    , { field: 'type', minWidth: 50, title: '电影类型', sort: true, align: 'center' }
                    , { field: 'upData', minWidth: 50, title: '上映时间', sort: true, align: 'center' }
                    , { field: 'area',minWidth: 50,  title: '首映地区', sort: true, align: 'center' }
                    , { field: 'time',minWidth: 50, title: '电影时长', sort: true, align: 'center' }
                    , { field: 'isClassic',minWidth: 50, title: '是否经典', sort: true, align: 'center' }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 150, align: 'center' }
                ]]
            });
        })
    }

    render() {
        this.el.html(`
        <div>
        <h1>信息列表</h1>
        
        </div>
        <table class="layui-hide adminMovies-list" id="test" lay-filter="test"> </table>
        `);
        this.renrender();
    };
}